package com.kemai.view

import android.os.Bundle
import com.kemai.common.adapter.ItemClickListener
import com.kemai.common.ui.BaseActivity
import com.kemai.view.tablayout.TabLayoutActivity

class ViewMainActivity : BaseActivity(), ItemClickListener {
    private val studyContent = arrayOf("自定义View","NestedScrollView的使用","TabLayout的使用")
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_common_content)
        setTiTle("View")
        setAdapterContent(studyContent,ViewMainActivity@this,ViewMainActivity@this)
    }

    override fun itemClick(position: Int) {

        when(position){
            0->{
                showPage(ViewMainActivity@this,CustomizeViewActivity::class.java)
            }
            1->{
                showPage(ViewMainActivity@this,NestedScrollViewActivity::class.java)
            }
            2->{
                showPage(ViewMainActivity@this,TabLayoutActivity::class.java)
            }
        }

    }
}